#pragma once

#include<iostream>
using namespace std;

#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
#include<ctime>
#include<sys/wait.h>

const char* str = "name_pipe";

#define SIZE 128


#define Debug   0
#define Notice  1
#define Warning 2
#define Error   3

const char* mes[] = {
    "Debug",
    "Notice",
    "Warning",
    "Error"
};

ostream& Log(const char* mesg, int level)
{
    cout << "| " << time(nullptr) << " | ::" << mesg << "\t[" << mes[level]  << "]"<< endl;
    return cout;
}